def get_page(page, limit, data):
    total_size = len(data)
    if total_size > limit:
        total_page = total_size // limit
        start_pos = (page - 1) * limit
        if page <= total_page:
            data = data[start_pos:start_pos + limit]
        else:
            data = data[start_pos:]
    return data, total_size
